//
//  OnlineMovieModel.m
//  UI_stroy bored版
//
//  Created by dllo on 16/1/29.
//  Copyright © 2016年 mjh. All rights reserved.
//

#import "OnlineMovieModel.h"
#import "MovieDetailModel.h"

@implementation OnlineMovieModel


-(instancetype)initWithDataSource:(NSDictionary *)dataSource {
    
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
        
        
        for (NSDictionary *dictionary in self.entries) {
            
            MovieDetailModel *movieDetailModel = [[MovieDetailModel alloc]init];
            [movieDetailModel setValuesForKeysWithDictionary:dictionary];
            
            [array addObject:movieDetailModel];
            
            
        }
        
        self.entries = [NSArray arrayWithArray:array];
    }
    
    
    return self;
    
}






-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    
}
-(id)valueForUndefinedKey:(NSString *)key {
    return nil;
}
@end
